package com.example.logistics_manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.logistics_manage.pojo.User;
import com.example.logistics_manage.pojo.dto.UserRoleDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface UserMapper extends BaseMapper<User> {
    User login(User user);

    User registerCheck(String userName);

    User  findByPhone(Long phone);

    int updateCodeByPhone(@Param("code") Integer code,@Param("phone") Long phone);

    int updateImageByPhone(@Param("phone")Long phone,@Param("image")String image);


    int updateUser(User user);

    List<UserRoleDto> selectAllEmp();

    List<User> selectEmp(User user);

    List<User> selectAdminBy(User user);

    List<User> selectDriverBy(User user);

    List<User> selectCustomerBy(User user);

}
